#ifndef TRMDKLINECHART_H
#define TRMDKLINECHART_H

#include "include/TrService.h"
#include "include/TrDateTime.h"
#include "include/TrMdGridBase.h"


class CTrMdKlineChart : public CTrMdGridBase, public CTrReceiver
{
    Q_OBJECT
public:
    CTrMdKlineChart();
    virtual ~CTrMdKlineChart() override;
protected:
    virtual void paintEvent(QPaintEvent* event) override;
    virtual void OnReceiveData(Tr_ResponseID rId, void* wParam, void* lParam) override;
    void drawKLines(QPainter* painter);
public:
    QMap<QString, TrKLineStruct>        m_mapKLines;
    CTrDateTime                         m_Dateime;
    int                                 m_iLoadCount;
    void readQuoteFile();
    void readHistory();
    void OnHistory(QString s);
};

#endif // TRMDKLINECHART_H
